package org.mfoyou.agent.common.dao.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class HuawuServiceCouponExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer limitStart;

    protected Integer limitEnd;

    public HuawuServiceCouponExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimitStart(Integer limitStart) {
        this.limitStart=limitStart;
    }

    public Integer getLimitStart() {
        return limitStart;
    }

    public void setLimitEnd(Integer limitEnd) {
        this.limitEnd=limitEnd;
    }

    public Integer getLimitEnd() {
        return limitEnd;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andServiceCouponIdIsNull() {
            addCriterion("service_coupon_id is null");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdIsNotNull() {
            addCriterion("service_coupon_id is not null");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdEqualTo(Integer value) {
            addCriterion("service_coupon_id =", value, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdNotEqualTo(Integer value) {
            addCriterion("service_coupon_id <>", value, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdGreaterThan(Integer value) {
            addCriterion("service_coupon_id >", value, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("service_coupon_id >=", value, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdLessThan(Integer value) {
            addCriterion("service_coupon_id <", value, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdLessThanOrEqualTo(Integer value) {
            addCriterion("service_coupon_id <=", value, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdIn(List<Integer> values) {
            addCriterion("service_coupon_id in", values, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdNotIn(List<Integer> values) {
            addCriterion("service_coupon_id not in", values, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdBetween(Integer value1, Integer value2) {
            addCriterion("service_coupon_id between", value1, value2, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andServiceCouponIdNotBetween(Integer value1, Integer value2) {
            addCriterion("service_coupon_id not between", value1, value2, "serviceCouponId");
            return (Criteria) this;
        }

        public Criteria andAgentIdIsNull() {
            addCriterion("agent_id is null");
            return (Criteria) this;
        }

        public Criteria andAgentIdIsNotNull() {
            addCriterion("agent_id is not null");
            return (Criteria) this;
        }

        public Criteria andAgentIdEqualTo(Integer value) {
            addCriterion("agent_id =", value, "agentId");
            return (Criteria) this;
        }
        
        public Criteria andCouponCountGrterThanSold() {
            addCriterion("total_count > coupon_solds");
            return (Criteria) this;
        }
        
        public Criteria andAgentIdNotEqualTo(Integer value) {
            addCriterion("agent_id <>", value, "agentId");
            return (Criteria) this;
        }

        public Criteria andAgentIdGreaterThan(Integer value) {
            addCriterion("agent_id >", value, "agentId");
            return (Criteria) this;
        }

        public Criteria andAgentIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("agent_id >=", value, "agentId");
            return (Criteria) this;
        }

        public Criteria andAgentIdLessThan(Integer value) {
            addCriterion("agent_id <", value, "agentId");
            return (Criteria) this;
        }

        public Criteria andAgentIdLessThanOrEqualTo(Integer value) {
            addCriterion("agent_id <=", value, "agentId");
            return (Criteria) this;
        }

        public Criteria andAgentIdIn(List<Integer> values) {
            addCriterion("agent_id in", values, "agentId");
            return (Criteria) this;
        }

        public Criteria andAgentIdNotIn(List<Integer> values) {
            addCriterion("agent_id not in", values, "agentId");
            return (Criteria) this;
        }

        public Criteria andAgentIdBetween(Integer value1, Integer value2) {
            addCriterion("agent_id between", value1, value2, "agentId");
            return (Criteria) this;
        }

        public Criteria andAgentIdNotBetween(Integer value1, Integer value2) {
            addCriterion("agent_id not between", value1, value2, "agentId");
            return (Criteria) this;
        }

        public Criteria andCouponNameIsNull() {
            addCriterion("coupon_name is null");
            return (Criteria) this;
        }

        public Criteria andCouponNameIsNotNull() {
            addCriterion("coupon_name is not null");
            return (Criteria) this;
        }

        public Criteria andCouponNameEqualTo(String value) {
            addCriterion("coupon_name =", value, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameNotEqualTo(String value) {
            addCriterion("coupon_name <>", value, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameGreaterThan(String value) {
            addCriterion("coupon_name >", value, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameGreaterThanOrEqualTo(String value) {
            addCriterion("coupon_name >=", value, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameLessThan(String value) {
            addCriterion("coupon_name <", value, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameLessThanOrEqualTo(String value) {
            addCriterion("coupon_name <=", value, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameLike(String value) {
            addCriterion("coupon_name like", value, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameNotLike(String value) {
            addCriterion("coupon_name not like", value, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameIn(List<String> values) {
            addCriterion("coupon_name in", values, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameNotIn(List<String> values) {
            addCriterion("coupon_name not in", values, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameBetween(String value1, String value2) {
            addCriterion("coupon_name between", value1, value2, "couponName");
            return (Criteria) this;
        }

        public Criteria andCouponNameNotBetween(String value1, String value2) {
            addCriterion("coupon_name not between", value1, value2, "couponName");
            return (Criteria) this;
        }

        public Criteria andTotalCountIsNull() {
            addCriterion("total_count is null");
            return (Criteria) this;
        }

        public Criteria andTotalCountIsNotNull() {
            addCriterion("total_count is not null");
            return (Criteria) this;
        }

        public Criteria andTotalCountEqualTo(Integer value) {
            addCriterion("total_count =", value, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountNotEqualTo(Integer value) {
            addCriterion("total_count <>", value, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountGreaterThan(Integer value) {
            addCriterion("total_count >", value, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountGreaterThanOrEqualTo(Integer value) {
            addCriterion("total_count >=", value, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountLessThan(Integer value) {
            addCriterion("total_count <", value, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountLessThanOrEqualTo(Integer value) {
            addCriterion("total_count <=", value, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountIn(List<Integer> values) {
            addCriterion("total_count in", values, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountNotIn(List<Integer> values) {
            addCriterion("total_count not in", values, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountBetween(Integer value1, Integer value2) {
            addCriterion("total_count between", value1, value2, "totalCount");
            return (Criteria) this;
        }

        public Criteria andTotalCountNotBetween(Integer value1, Integer value2) {
            addCriterion("total_count not between", value1, value2, "totalCount");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsIsNull() {
            addCriterion("coupon_solds is null");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsIsNotNull() {
            addCriterion("coupon_solds is not null");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsEqualTo(Integer value) {
            addCriterion("coupon_solds =", value, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsNotEqualTo(Integer value) {
            addCriterion("coupon_solds <>", value, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsGreaterThan(Integer value) {
            addCriterion("coupon_solds >", value, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsGreaterThanOrEqualTo(Integer value) {
            addCriterion("coupon_solds >=", value, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsLessThan(Integer value) {
            addCriterion("coupon_solds <", value, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsLessThanOrEqualTo(Integer value) {
            addCriterion("coupon_solds <=", value, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsIn(List<Integer> values) {
            addCriterion("coupon_solds in", values, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsNotIn(List<Integer> values) {
            addCriterion("coupon_solds not in", values, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsBetween(Integer value1, Integer value2) {
            addCriterion("coupon_solds between", value1, value2, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponSoldsNotBetween(Integer value1, Integer value2) {
            addCriterion("coupon_solds not between", value1, value2, "couponSolds");
            return (Criteria) this;
        }

        public Criteria andCouponTextIsNull() {
            addCriterion("coupon_text is null");
            return (Criteria) this;
        }

        public Criteria andCouponTextIsNotNull() {
            addCriterion("coupon_text is not null");
            return (Criteria) this;
        }

        public Criteria andCouponTextEqualTo(String value) {
            addCriterion("coupon_text =", value, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextNotEqualTo(String value) {
            addCriterion("coupon_text <>", value, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextGreaterThan(String value) {
            addCriterion("coupon_text >", value, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextGreaterThanOrEqualTo(String value) {
            addCriterion("coupon_text >=", value, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextLessThan(String value) {
            addCriterion("coupon_text <", value, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextLessThanOrEqualTo(String value) {
            addCriterion("coupon_text <=", value, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextLike(String value) {
            addCriterion("coupon_text like", value, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextNotLike(String value) {
            addCriterion("coupon_text not like", value, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextIn(List<String> values) {
            addCriterion("coupon_text in", values, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextNotIn(List<String> values) {
            addCriterion("coupon_text not in", values, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextBetween(String value1, String value2) {
            addCriterion("coupon_text between", value1, value2, "couponText");
            return (Criteria) this;
        }

        public Criteria andCouponTextNotBetween(String value1, String value2) {
            addCriterion("coupon_text not between", value1, value2, "couponText");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeIsNull() {
            addCriterion("modify_time is null");
            return (Criteria) this;
        }

        public Criteria andModifyTimeIsNotNull() {
            addCriterion("modify_time is not null");
            return (Criteria) this;
        }

        public Criteria andModifyTimeEqualTo(Date value) {
            addCriterion("modify_time =", value, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeNotEqualTo(Date value) {
            addCriterion("modify_time <>", value, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeGreaterThan(Date value) {
            addCriterion("modify_time >", value, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("modify_time >=", value, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeLessThan(Date value) {
            addCriterion("modify_time <", value, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeLessThanOrEqualTo(Date value) {
            addCriterion("modify_time <=", value, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeIn(List<Date> values) {
            addCriterion("modify_time in", values, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeNotIn(List<Date> values) {
            addCriterion("modify_time not in", values, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeBetween(Date value1, Date value2) {
            addCriterion("modify_time between", value1, value2, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andModifyTimeNotBetween(Date value1, Date value2) {
            addCriterion("modify_time not between", value1, value2, "modifyTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeIsNull() {
            addCriterion("coupon_start_time is null");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeIsNotNull() {
            addCriterion("coupon_start_time is not null");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeEqualTo(Date value) {
            addCriterion("coupon_start_time =", value, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeNotEqualTo(Date value) {
            addCriterion("coupon_start_time <>", value, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeGreaterThan(Date value) {
            addCriterion("coupon_start_time >", value, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("coupon_start_time >=", value, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeLessThan(Date value) {
            addCriterion("coupon_start_time <", value, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeLessThanOrEqualTo(Date value) {
            addCriterion("coupon_start_time <=", value, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeIn(List<Date> values) {
            addCriterion("coupon_start_time in", values, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeNotIn(List<Date> values) {
            addCriterion("coupon_start_time not in", values, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeBetween(Date value1, Date value2) {
            addCriterion("coupon_start_time between", value1, value2, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponStartTimeNotBetween(Date value1, Date value2) {
            addCriterion("coupon_start_time not between", value1, value2, "couponStartTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeIsNull() {
            addCriterion("coupon_end_time is null");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeIsNotNull() {
            addCriterion("coupon_end_time is not null");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeEqualTo(Date value) {
            addCriterion("coupon_end_time =", value, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeNotEqualTo(Date value) {
            addCriterion("coupon_end_time <>", value, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeGreaterThan(Date value) {
            addCriterion("coupon_end_time >", value, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("coupon_end_time >=", value, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeLessThan(Date value) {
            addCriterion("coupon_end_time <", value, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeLessThanOrEqualTo(Date value) {
            addCriterion("coupon_end_time <=", value, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeIn(List<Date> values) {
            addCriterion("coupon_end_time in", values, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeNotIn(List<Date> values) {
            addCriterion("coupon_end_time not in", values, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeBetween(Date value1, Date value2) {
            addCriterion("coupon_end_time between", value1, value2, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andCouponEndTimeNotBetween(Date value1, Date value2) {
            addCriterion("coupon_end_time not between", value1, value2, "couponEndTime");
            return (Criteria) this;
        }

        public Criteria andUseTypeIsNull() {
            addCriterion("use_type is null");
            return (Criteria) this;
        }

        public Criteria andUseTypeIsNotNull() {
            addCriterion("use_type is not null");
            return (Criteria) this;
        }

        public Criteria andUseTypeEqualTo(Integer value) {
            addCriterion("use_type =", value, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeNotEqualTo(Integer value) {
            addCriterion("use_type <>", value, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeGreaterThan(Integer value) {
            addCriterion("use_type >", value, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("use_type >=", value, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeLessThan(Integer value) {
            addCriterion("use_type <", value, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeLessThanOrEqualTo(Integer value) {
            addCriterion("use_type <=", value, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeIn(List<Integer> values) {
            addCriterion("use_type in", values, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeNotIn(List<Integer> values) {
            addCriterion("use_type not in", values, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeBetween(Integer value1, Integer value2) {
            addCriterion("use_type between", value1, value2, "useType");
            return (Criteria) this;
        }

        public Criteria andUseTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("use_type not between", value1, value2, "useType");
            return (Criteria) this;
        }

        public Criteria andCouponStateIsNull() {
            addCriterion("coupon_state is null");
            return (Criteria) this;
        }

        public Criteria andCouponStateIsNotNull() {
            addCriterion("coupon_state is not null");
            return (Criteria) this;
        }

        public Criteria andCouponStateEqualTo(Integer value) {
            addCriterion("coupon_state =", value, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateNotEqualTo(Integer value) {
            addCriterion("coupon_state <>", value, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateGreaterThan(Integer value) {
            addCriterion("coupon_state >", value, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("coupon_state >=", value, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateLessThan(Integer value) {
            addCriterion("coupon_state <", value, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateLessThanOrEqualTo(Integer value) {
            addCriterion("coupon_state <=", value, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateIn(List<Integer> values) {
            addCriterion("coupon_state in", values, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateNotIn(List<Integer> values) {
            addCriterion("coupon_state not in", values, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateBetween(Integer value1, Integer value2) {
            addCriterion("coupon_state between", value1, value2, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponStateNotBetween(Integer value1, Integer value2) {
            addCriterion("coupon_state not between", value1, value2, "couponState");
            return (Criteria) this;
        }

        public Criteria andCouponDetailIsNull() {
            addCriterion("coupon_detail is null");
            return (Criteria) this;
        }

        public Criteria andCouponDetailIsNotNull() {
            addCriterion("coupon_detail is not null");
            return (Criteria) this;
        }

        public Criteria andCouponDetailEqualTo(String value) {
            addCriterion("coupon_detail =", value, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailNotEqualTo(String value) {
            addCriterion("coupon_detail <>", value, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailGreaterThan(String value) {
            addCriterion("coupon_detail >", value, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailGreaterThanOrEqualTo(String value) {
            addCriterion("coupon_detail >=", value, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailLessThan(String value) {
            addCriterion("coupon_detail <", value, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailLessThanOrEqualTo(String value) {
            addCriterion("coupon_detail <=", value, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailLike(String value) {
            addCriterion("coupon_detail like", value, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailNotLike(String value) {
            addCriterion("coupon_detail not like", value, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailIn(List<String> values) {
            addCriterion("coupon_detail in", values, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailNotIn(List<String> values) {
            addCriterion("coupon_detail not in", values, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailBetween(String value1, String value2) {
            addCriterion("coupon_detail between", value1, value2, "couponDetail");
            return (Criteria) this;
        }

        public Criteria andCouponDetailNotBetween(String value1, String value2) {
            addCriterion("coupon_detail not between", value1, value2, "couponDetail");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}